﻿using NUnit.Framework;
using Payroll.Biz.Legacy.ServiceParams;
using System;

namespace Payroll.Biz.Legacy.Test.GPT
{
    /// <summary>
    /// Prompt: One method use the following C# class as the input parameter, I want to write unit tests for the method,
    /// could you help me generate different test class instances?
    /// public class AddSalariedEmployeeServiceParams : AbstractServiceParams
    /// { 
    ///   public string Name { get; set; } 
    ///   public string Address { get; set; }
    ///   public decimal Salary { get; set; } 
    /// }
    /// </summary>
    [TestFixture]
    public class GenerateParameters
    {
        #region [Initial response]

        [Test]
        public void TestWithValidParameters()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "John Doe",
                Address = "123 Main St",
                Salary = 50000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithEmptyName()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = string.Empty,
                Address = "123 Main St",
                Salary = 50000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithNullAddress()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "Jane Doe",
                Address = null,
                Salary = 50000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithZeroSalary()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "John Smith",
                Address = "456 Elm St",
                Salary = 0m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithNegativeSalary()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "Jane Smith",
                Address = "789 Maple Ave",
                Salary = -10000m
            };

            // Call your method here and perform assertions  
        }

        #endregion

        #region [Extra prompt: could you give me more?]

        // Extra prompt: could you give me more?
        [Test]
        public void TestWithLongName()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = new string('A', 1000), // Very long name  
                Address = "123 Main St",
                Salary = 60000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithSpecialCharactersInName()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "J@ne D0e!",
                Address = "123 Main St",
                Salary = 60000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithWhitespaceAddress()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "John Doe",
                Address = "   ", // Whitespace address  
                Salary = 60000m
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithMaximumDecimalSalary()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "John Doe",
                Address = "123 Main St",
                Salary = decimal.MaxValue
            };

            // Call your method here and perform assertions  
        }

        [Test]
        public void TestWithMinimumDecimalSalary()
        {
            AddSalariedEmployeeServiceParams serviceParams = new AddSalariedEmployeeServiceParams
            {
                Name = "John Doe",
                Address = "123 Main St",
                Salary = decimal.MinValue
            };

            // Call your method here and perform assertions  
        }

        #endregion
    }
}
